<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>结算页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	
	
	
    <link href='https://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Raleway:400,100' rel='stylesheet' type='text/css'>
    
    <!-- Bootstrap -->
    <link rel="stylesheet" href="PAGE/css/bootstrap.min.css">
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="PAGE/css/font-awesome.min.css">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="PAGE/css/owl.carousel.css">
    <link rel="stylesheet" href="PAGE/style.css">
    <link rel="stylesheet" href="PAGE/css/responsive.css">

  </head>
  
  <body>
   <div class="header-area">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="user-menu">
                        <ul>
                            <li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user"></i> 我的账户</a></li>
                          <!--   <li><a href="#"><i class="fa fa-heart"></i>心愿单</a></li> -->
                            <li><a href="AddCartServlet?id=0"><i class="fa fa-user"></i>购物车</a></li>
                            <li><a href="OrderServlet?type=0"><i class="fa fa-user"></i> 订单信息</a></li>
                            
                            
                            <c:choose>
                            	<c:when test="${sessionScope.user.usersNickname eq null}">
                            	<li><a href="UserAndOrder/login.jsp"><i class="fa fa-user">用户登录</i>
                            	
                            	</c:when>
                            	<c:otherwise>
                            	<li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user">${sessionScope.user.usersNickname}</i>
                            	
                            	</c:otherwise>
                            </c:choose>
                            
                             </a></li>
                        </ul>
                    </div>
                </div>
                
                <div class="col-md-4">
                    <div class="header-right">
                        <ul class="list-unstyled list-inline">
                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">货币 :</span><span class="value">人民币 </span><b class="caret"></b></a>

                            </li>

                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">语言:</span><span class="value">简体中文</span><b class="caret"></b></a>
                                <ul class="dropdown-menu">

                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div> <!-- End header area -->
    
  
                    <div class="logo">
                        <div style="text-align: center;">
                            <form action="UserSearchServlet" method="post">
                            	<a href="PAGE/InterFace.jsp"><img src="PAGE/img/logo.png"   ></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			
                      			 <font style="font-style:微软雅黑;" size="5" color="#0C89CF">搜 索 商 品    </font>
                       			<input type="text" name="serch">
                                <input type="submit" value="搜索">
                            </form>  
                        </div>
                    </div>
                    
<!-- End site branding area -->
    
    
    <div class="mainmenu-area">
        <div class="container">
            <div class="row">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div> 
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li><a href="/eshop/PAGE/InterFace.jsp">主页</a></li>
                        <li><a href="UserSearchServlet">商品页面</a></li>
                        <li><a href="/eshop/PAGE/single-product.jsp">商品详情</a></li>
                        <li><a href="AddCartServlet?id=0">购物车</a></li>
                        <li><a href="OrderServlet?type=0">您的宝贝</a></li>
                         <li><a href="EvaluateServlet?type=showEvaluate">留言板</a></li>
                        <%--
                        <li><a href="#">Category</a></li>
                        <li><a href="#">Others</a></li>
                        <li><a href="#">Contact</a></li>
                    --%></ul>
                </div>  
            </div>
        </div>
    </div> <!-- End mainmenu area -->
    
    <div class="product-big-title-area">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="product-bit-title text-center">
                        <h2>Shopping Cart</h2>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    
    
    
   <div class="single-product-area">
			<div class="zigzag-bottom"></div>
			<div class="container">
				<div class="row">
					 <div class="col-md-4">
                    <div class="single-sidebar">
                        <h2 class="sidebar-title">搜 索 商 品</h2>
                        <form action="UserSearchServlet" method="post">
                       			<input type="text" name="usersearch" placeholder="请输入搜索内容">
                                <input type="submit" value="搜索">
                        </form>
                    </div>
                    
                   	<div class="single-sidebar">
							<h2 class="sidebar-title">
								其他商品
							</h2>
							
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-1.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=3">魅族MAX4</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										￥1699
									</ins>

								</div>
							</div>
							
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-b.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=23">NikonCOOLPIX P900s</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										￥7999
									</ins>
								</div>
							</div>
							
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-c.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=10">联想700S</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										￥5888
									</ins>
				
								</div>
							</div>
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-d.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=15">戴尔ran</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										$700.00
									</ins>
								</div>
							</div>
						</div>
                    
                  <div class="single-sidebar">
							<h2 class="sidebar-title">
								推 荐 商 品
							</h2>
							<ul>
								<li>
									<a href="ProductDetailsServlet?id=19">NikonCOOLPIX P330</a>
								</li>
								<li>
									<a href="ProductDetailsServlet?id=20">NikonCOOLPIX P900s</a>
								</li>

							</ul>
						</div>
                </div>
                
                <div class="col-md-8">
                    <div class="product-content-right">
                        <div class="woocommerce">
                            






<!-- 表单开始 -->

                    <form action="OrderServlet" method="post"> 
                           
                                <h3 id="order_review_headin	g" align="center">您的订单</h3>
  							 <c:forEach items="${SongXiao.cart}" var="cart">
  							 
  							 
  							 
                           		<input type="hidden" value="${cart.goods.adminsId}" name="adminsId">
                           		<br>
                           		
                           
                                <div id="order_review" style="position: relative;">
                                
                                    <table class="shop_table">
                                        <thead>
                                            <tr>
                                                <th class="product-name">商品名称</th>
                                                <th class="product-total" width="50%">${cart.goods.goodsName } </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr class="cart_item">
                                                <td class="product-name">
                                                  	  个数 <strong class="product-quantity"></strong> </td>
                                                <td class="product-total">
                                                    <span class="amount">${cart.goodsAmount}</span> </td>
                                                    
                                                  <input type="hidden" name="goodsAmount" value="${cart.goodsAmount}">
                                            	  <input type="hidden" name="goodsId" value="${cart.goods.goodsId}">
                                            </tr>
                                        </tbody>
                                        <tr>

                                            <tr class="cart-subtotal">
                                                <th>合计</th>
                                                <td><span class="amount" >${cart.goodsAmount *cart.goods.goodsPrice}</span>
                                                	<input type="hidden" value="${cart.goodsAmount *cart.goods.goodsPrice}" name="everPrice">
                                                </td>
                                            </tr>

                                        </tr>
                                        </table>
                         			</c:forEach> 
                         			  
                         			<table class="shop_table">
                         				
                                            <tr class="shipping">
                                                <th>运送方式</th>
                                                <td width="50%"> 
                                                	免邮
                                                 </td>
                                             </tr>     
                                                
                                             <tr class="shipping">   
                       							 <th>总价</th>
                                                <td>
													${result }	
                                                   	<input type="hidden" value="${result}" name="allprice">	 
                                                </td>               
                                             </tr>
                                               
                           			</table>
                           		
                           			<div align="right">
                           	 收货地址&联系电话<select class="country_to_state country_select" id="billing_country" name="billing_country">
 								   			  <c:forEach items="${SongXiao.address}" var="address">
 								   			  <c:if test="${address.addressExist eq 1}">
 								   			  <option value="${address.addressId}" >地址：${address.addressRoute }&电话：${address.connectTel}</option>
 								   			  </c:if>
                           				
                           					</c:forEach>           
                            			</select>
									</div>
                           			<div align="center" style="margin-top: 20px">
                           			
                           			<input type="hidden" value="ad" name="type">
                           			<input type="submit" value="确认订单">
                           			</div>
                           			
							</form>  
							
<!-- 表单结束-->
							
							
							
							
							
							
							
							
							
                        </div>                       
                    </div>                    
                </div>
            </div>
        </div>
    </div>


   
 
   
    <!-- Latest jQuery form server -->
    <script src="https://code.jquery.com/jquery.min.js"></script>
    
    <!-- Bootstrap JS form CDN -->
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    
    <!-- jQuery sticky menu -->
    <script src="PAGE/js/owl.carousel.min.js"></script>
    <script src="PAGE/js/jquery.sticky.js"></script>
    
    <!-- jQuery easing -->
    <script src="PAGE/js/jquery.easing.1.3.min.js"></script>
    
    <!-- Main Script -->
    <script src="PAGE/js/main.js"></script>
  </body>
</html>
